<?
$rental_list=select_lines_all_items($table_Prefix."rental","","equipmentid = '".$detail['nid']."' order by borrowdate desc,nid desc","");?>



<table class="layui-table">
    <colgroup>
        <col width="60">
        <col width="100">
        <col >
        <col >
        <col >
        <col >
        <col >
        <col >
        <col >
        <col >
        <col width="200">

        <col>
    </colgroup>
    <thead>
    <tr>



        <th>序号</th>
        <th>车牌</th>
        <th>出借日期</th>
        <th>借车人</th>
        <th>归还日期</th>
        <th>领取签名</th>
        <th>归还签名</th>
        <th>归还备注</th>
        <th>状态</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>


    <?php
    for ($i = 0; $i < count($rental_list); $i++) {
        ?>
        <tr>
            <td><?echo $i+1 ?></td>
            <td><?echo $rental_list[$i]['name']?></td>
            <td><?echo $rental_list[$i]['borrowdate']?></td>

            <?$borrower=select_one_line_all_items($table_Prefix."employee","nid = '".$rental_list[$i]['borrower']."'");?>
            <td><?echo $borrower['name']?></td>
            <td><?echo $rental_list[$i]['returndate']?></td>
            <td><a href="/uploadfiles/signup/<?echo $rental_list[$i]["signup"]?>" target="_blank"><img src="/uploadfiles/signup/<?echo $rental_list[$i]["signup"]?>"  height="40px"/></a></td>
            <td><a href="/uploadfiles/signup/<?echo $rental_list[$i]["signup"]?>" target="_blank"><img src="/uploadfiles/signup/<?echo $rental_list[$i]["returnsignup"]?>"  height="40px"/></a></td>
            <td><?echo $rental_list[$i]['returnremark']?></td>
            <td><?echo $rental_list[$i]['status']?></td>
            <td>






                <? if($rental_list[$i]['status']!="已归还"){?>

                    <a href="../rental/detail-edit.php?nav-itemed=<?echo $system_part?>&nid=<? echo $rental_list[$i]['equipmentid']?>" class="layui-btn layui-btn-primary layui-btn-small" >
                        <i class="layui-icon">&#xe642;</i>修改
                    </a>


                    <a href="../rental/detail-end.php?nav-itemed=<?echo $system_part?>&nid=<? echo $rental_list[$i]['equipmentid']?>" class="layui-btn layui-btn-primary layui-btn-small" >
                        归还
                    </a>





                    <?;}?>

                <a href="javascript:void(0)" onclick="popupBox(<?php echo $rental_list[$i]['nid'] ?>)" class="delete layui-btn layui-btn-primary layui-btn-small" style="display: none" >删除
                    <i class="layui-icon">&#xe640;</i> </a>
            </td>
        </tr>
        <?php

    }
    ?>


    </tbody>
</table>